// default package
// Generated Oct 27, 2014 2:25:38 PM by Hibernate Tools 3.4.0.CR1

import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * History generated by hbm2java
 */
@Entity
@Table(name = "history", catalog = "banksystem")
public class History implements java.io.Serializable {

	private Integer id;
	private Userinfo userinfo;
	private Date start;
	private Date end;

	public History() {
	}

	public History(Userinfo userinfo, Date start) {
		this.userinfo = userinfo;
		this.start = start;
	}

	public History(Userinfo userinfo, Date start, Date end) {
		this.userinfo = userinfo;
		this.start = start;
		this.end = end;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "id", unique = true, nullable = false)
	public Integer getId() {
		return this.id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "loginId", nullable = false)
	public Userinfo getUserinfo() {
		return this.userinfo;
	}

	public void setUserinfo(Userinfo userinfo) {
		this.userinfo = userinfo;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "start", nullable = false, length = 19)
	public Date getStart() {
		return this.start;
	}

	public void setStart(Date start) {
		this.start = start;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "end", length = 19)
	public Date getEnd() {
		return this.end;
	}

	public void setEnd(Date end) {
		this.end = end;
	}

}
